<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>资源指数分析</title>
<link type="text/css" href="<%=basePath%>css/bootstrap.min.css" rel="stylesheet">
<link type="text/css" href="<%=basePath%>css/bootstrap-responsive.min.css" rel="stylesheet">
<script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/bootstrap.min.js"></script>
</head>
<body id="body" style="padding: 0px;">
	<div id="container" class="container-fluid" style='height: inherit; padding-left: 25px; padding-right: 25px'>
		<div class="row-fluid">
			<div class="column">
				<nav class="navbar navbar-default" role="navigation">
				<div class="navbar-header">
					<button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#bs-example-navbar-collapse-1">
						<span class="sr-only">Toggle navigation</span> <span class="icon-bar"></span> <span class="icon-bar"></span> <span class="icon-bar"></span>
					</button>
					<a class="navbar-brand" href="#">资源指数分析</a>
				</div>

				<div class="collapse navbar-collapse" id="bs-example-navbar-collapse-1">
					<ul class="nav navbar-nav">
						<li id="instrumentButton"><a href="javascript:changeTab('instrument',true);">仪器</a></li>
						<li id="institutionButton"><a href="javascript:changeTab('institution',true);">机构</a></li>
						<li id="projectButton"><a href="javascript:changeTab('project',true);">检测项目</a></li>
						<li id="talentButton"><a href="javascript:changeTab('talent',true);">人才</a></li>
						<li id="baseButton"><a href="javascript:changeTab('base',true);">基地</a></li>
					</ul>
					<ul class="nav navbar-nav navbar-right">
						<li class="active"><a href="javaScript:void(0)" id="navt6_list" onclick="homePage();">返回</a></li>
					</ul>
				</div>
				</nav>	
			</div>
		</div>

		<div class="row-fluid">
			<div class="span6 column">
				<div id="div1" class="panel panel-default hidden">
					<div class="panel-heading">
						<h3 id="loc1" class="panel-title"></h3>
					</div>
					<div class="panel-body">
						<div id="con1" style="height: 600px; width: 100%; left: 0; top: 10;"></div>
					</div>
				</div>
				<div id="div3" class="panel panel-default hidden">
					<div class="panel-heading">
						<h3 id="loc3" class="panel-title"></h3>
					</div>
					<div class="panel-body">
						<div id="con3" style="height: 600px; width: 100%; left: 0; top: 10;"></div>
					</div>
				</div>
				<div id="div5" class="panel panel-default hidden">
					<div class="panel-heading">
						<h3 id="loc5" class="panel-title"></h3>
					</div>
					<div class="panel-body">
						<div id="con5" style="height: 600px; width: 100%; left: 0; top: 10;"></div>
					</div>
				</div>
			</div>
			<div class="span6">
				<div id="div2" class="panel panel-default hidden">
					<div class="panel-heading">
						<h3 id="loc2" class="panel-title"></h3>
					</div>
					<div class="panel-body">
						<div id="con2" style="height: 600px; width: 100%; left: 0; top: 10;"></div>
					</div>
				</div>
				<div id="div4" class="panel panel-default hidden">
					<div class="panel-heading">
						<h3 id="loc4" class="panel-title"></h3>
					</div>
					<div class="panel-body">
						<div id="con4" style="height: 600px; width: 100%; left: 0; top: 10;"></div>
					</div>
				</div>
				<div id="div6" class="panel panel-default hidden">
					<div class="panel-heading">
						<h3 id="loc6" class="panel-title"></h3>
					</div>
					<div class="panel-body">
						<div id="con6" style="height: 600px; width: 100%; left: 0; top: 10;"></div>
					</div>
				</div>
			</div>
		</div>
	</div>

	<script type="text/javascript" src="<%=basePath%>echarts/echarts.min.js"></script>
	<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=gkhZkvMMhPRMs1ybtbM7nmhH1ryHr6Dp"></script>
	<script type="text/javascript" src="<%=basePath%>echarts/bmap.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>echarts/map/js/heilongjiang.js"></script>
	<script type="text/javascript" src="<%=basePath%>echarts/theme/macarons.js"></script>
	<script type="text/javascript" src="<%=basePath%>mapv/mapv.min.js"></script>
	<script type="text/javascript" src="<%=basePath%>js/indexAnalysis.js"></script>
	<script type="text/javascript">
		function changeTab(resource,jump) {
			if(jump){
				window.location.href="<%=basePath%>" + resource+ "/indexAnalysis.ins";
				return;
			}
			var resources = [ "instrument", "institution", "project", "talent",
					"base" ];
			// 导航窗格样式
			for (var i = 0; i < resources.length; i++) {
				$('#' + resources[i] + 'Button').removeClass('active');
			}
			$('#' + resource + 'Button').addClass('active');
			// 小窗口标题
			var title = null;
			switch (resource) {
			case "instrument":
				title = [ "仪器分布(详细)", "仪器分布", "仪器类型", "仪器产地", "仪器使用状态" ];
				break;
			case "institution":
				title = [ "机构分布(详细)", "机构分布", "机构类型", "机构技术领域", "机构技术领域(子)" ];
				break;
			case "project":
				title = [ "检测项目分布(详细)", "检测项目分布", "检测项目检测领域", "检测项目行业类别" ];
				break;
			case "talent":
				title = [ "人才分布(详细)", "人才分布", "人才性别", "人才职称" ];
				break;
			case "base":
				title = [ "基地分布(详细)", "基地分布", "基地类型", "基地级别" ];
				break;
			}
			for (var i = 1; i <= title.length; i++) {
				$("#loc" + i).text(title[i - 1]);
				$("#div" + i).removeClass("hidden");
			}
			// 表格数据请求
			switch (resource) {
			case "instrument":
				ajaxFbDetail("con1");
				ajaxFbCity("con2", '黑龙江主要城市 仪器分布', '仪器数量');
				ajaxZhibiao("con3", "type", '黑龙江仪器类型Top7', "仪器类型");
				ajaxZhibiao("con4", "home", '黑龙江仪器产地Top7', "仪器产地");
				ajaxZhibiao("con5", "status", '黑龙江仪器使用状态Top7', "仪器使用状态");
				break;
			case "institution":
				ajaxFbDetail("con1");
				ajaxFbCity("con2", '黑龙江主要城市 机构分布', '机构数量');
				ajaxZhibiao("con3", "type", '黑龙江机构类型Top7', "机构类型");
				ajaxZhibiao("con4", "tech_parent", '黑龙江机构技术领域（父）Top7', "机构技术领域");
				ajaxZhibiao("con5", "tech_child", '黑龙江机构技术领域（子）Top7',
						"机构技术领域（子）");
				break;
			case "project":
				ajaxFbDetail("con1");
				ajaxFbCity("con2", '黑龙江主要城市 检测项目分布', '仪器数量');
				ajaxZhibiao("con3", "df_parent", '黑龙江检测项目检测领域Top7', "检测项目检测领域");
				ajaxZhibiao("con4", "ic_parent", '黑龙江检测项目行业类别Top7', "检测项目行业类别");
				break;
			case "talent":
				ajaxFbDetail("con1");
				ajaxFbCity("con2", '黑龙江主要城市 人才分布', '人才数量');
				ajaxZhibiao("con3", "sex", '黑龙江人才性别', "人才性别");
				ajaxZhibiao("con4", "title", '黑龙江人才职称', "人才职称");
				break;
			case "base":
				ajaxFbDetail("con1");
				ajaxFbCity("con2", '黑龙江主要城市 基地分布', '基地数量');
				ajaxZhibiao("con3", "type", '黑龙江基地类型', "基地类型");
				ajaxZhibiao("con4", "level", '黑龙江基地级别', "基地级别");
				break;
			}
		}
		changeTab("${resource}", false);
		
		function homePage(){
			var url = "<%=basePath%>";
			switch ("${resource}") {
			case "instrument":
				url += "instrument/dxyq.ins";
				break;
			case "institution":
				url += "institution/dw.ins";
				break;
			case "project":
				url += "project/xm.ins";
				break;
			case "talent":
				url += "talent/ry.ins";
				break;
			case "base":
				url += "base/syjd.ins";
				break;
			}
			window.location.href = url;
			return;
		}
	</script>
</body>
</html>